<?php $this->headLink()->appendStylesheet(WSB_URL . 'WSB/3rdparty/ext-2.0/resources/css/ext-all.css'); ?>
<?php $this->headScript()->appendFile(WSB_URL . 'WSB/3rdparty/ext-2.0/adapter/ext/ext-base.js'); ?>
<?php $this->headScript()->appendFile(WSB_URL . 'WSB/3rdparty/ext-2.0/ext-all.js'); ?>

<script type="text/javascript">

	Ext.MessageBox.buttonText.yes = "Ja";
	Ext.MessageBox.buttonText.no = "Nein";

	function dialogConfirm() {
        Ext.MessageBox.confirm('Best&auml;tigung', 'Wollen Sie das wirklich?', function(id) {
    		if(id == 'yes') {
				var msg = Ext.get('extjscontent');
				msg.load({
					url: '<?php echo WSB_ADMIN_URL ?>test/extjs/dialog/',
					params: '',
					text: 'Updating...',
					scripts: true
				});
				msg.show();
    		}
    	});
	}

	function dialogPrompt() {
        Ext.MessageBox.prompt('Name', 'Geben Sie Ihren Namen ein:', showResultText);
	}

    function showResultText(btn, text){
    	//var msg = Ext.get('content');
    	//msg.insertHtml('afterEnd', text);
    	Ext.MessageBox.alert('Status', 'Sie haben den folgenden Text eingegeben: ' + text);
    };

	function loadIntoContent(url) {
		var msg = Ext.get('extjscontent');
		msg.load({
			url: url,
			params: '',
			text: 'Updating...',
			scripts: true
		});
		msg.show();
	}

	function messageBoxConfirm(val) {
        Ext.MessageBox.confirm('Best&auml;tigung', 'Wollen Sie den Eintrag mit der ID ' + val + ' l&ouml;schen?', function(id) {
    		if(id == 'yes') {
				var msg = Ext.get('extjscontent');
				msg.load({
					url: '<?php echo WSB_ADMIN_URL ?>test/extjs/grid/',
					params: 'delete=' + val,
					scripts: true
				});
				msg.show();
    		}
    	});
	}

</script>


<div style="margin-top:1em;" id="extjscontent"></div>